{[include file="../../../../library/view/templates/header.tpl"]}
<script src="{[$host]}js/member/memberList.js" type="text/javascript"></script>
{[include file="../../../../library/view/templates/tag/error.tpl"]}
<div class="BSpace10px"></div>
<div id="BMainTitleH1">{[$member_00001_Title]}</div>
<div class="BFence">
<div class="BSpace10px"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <div class="BFenceTopLeft">
            </div>
            <div class="BFenceTopRight">
            </div>
        </td>
    </tr>
    <tr>
        <td class="BFenceSideLine">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td height="40">
                            <h3>{[$member_00001_AddNotice]}、{[$member_00001_Add]}{[$member_00001_Member]}</h3>
                            <input type="button" class="BGrayBtn" style="argin-left: 15px" value="{[$member_00001_Member]}{[$member_00001_Add]}" onclick="member_Add()"/>
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <div class="BFenceBottomLeft">
            </div>
            <div class="BFenceBottomRight">
            </div>
        </td>
    </tr>
</table>
<div class="BSpace10px"></div>
<h2>{[$member_00001_Search]}</h2>
{[$member_00001_Notice]}
<div class="BTextAlignRight">
   {[$member_00001_NowSum]}{[$intSum]}{[$member_00001_Piece]}
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <div class="BFenceTopLeft">
            </div>
            <div class="BFenceTopRight">
            </div>
        </td>
    </tr>
    <tr>
        <td class="BFenceSideLine">
            <a href="#" onMouseDown="member_memberSearchHide()">
                {[$member_00001_Detail]}</a>
            <div  style="margin:0px;padding:0px;" id="searchDetail1">
            <table class="BGrayLineTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-bottom:0px">                            
                <tbody>
                    <tr>
                        <td class="BListLabel" width="25%">
                            {[$member_00001_Member]}ID
                        </td>
                        <td>
                            <input type="text" id="txtMemberId" name="txtMemberId" size="40" value="{[$arrSession.MemberId]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>
                        </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_MemberName]}
                            </td>
                            <td>
                                <input type="text" id="txtMemberName" name="txtMemberName" size="40" value="{[$arrSession.MemberName]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                    {[$member_00001_SaleTp]}
                            </td>
                            <td>
                                <label><input type="radio" {[if $arrSession.SaleTp == ""]}checked{[/if]} id="rdoSaleTp" name="rdoSaleTp" value=""/>&nbsp;{[$member_00001_NoLimit]}</label>&nbsp;
                                <label><input type="radio" {[if $arrSession.SaleTp == "1"]}checked{[/if]} id="rdoSaleTp" name="rdoSaleTp" value="1"/>&nbsp;{[$member_00001_Factory]}</label>&nbsp;
                                <label><input type="radio" {[if $arrSession.SaleTp == "2"]}checked{[/if]} id="rdoSaleTp" name="rdoSaleTp" value="2"/>&nbsp;{[$member_00001_Seller]}</label>
                            </td>
                        </tr>
                         <tr>
                            <td class="BListLabel">
                                {[$member_00001_Prov]}
                            </td>
                            <td>
                                <select id="selProv" name="selProv" class="selectable">
                                {[foreach from=$arrProv key=key item=item]}
                                    <option value="{[$item.KEY_CODE]}" {[if $arrSession.ProvCode == $item.KEY_CODE]}selected{[/if]}>{[$item.KEY_NAME]}</option>
                                {[/foreach]}
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_Position]}
                            </td>
                            <td>
                                <input type="text" id="txtPosition" name="txtPosition" size="40" value="{[$arrSession.Position]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                            {[$member_00001_Status]}
                            </td>
                            <td>
                                <label><input type="radio" {[if $arrSession.MemberStatus == ""]}checked{[/if]} id="rdoMemberStatus" name="rdoMemberStatus" value=""/>&nbsp;{[$member_00001_NoLimit]}</label>&nbsp;
                                <label><input type="radio" {[if $arrSession.MemberStatus == "1"]}checked{[/if]} id="rdoMemberStatus" name="rdoMemberStatus" value="1"/>&nbsp;{[$member_00001_Trust]}</label>&nbsp;
                                <label><input type="radio" {[if $arrSession.MemberStatus == "2"]}checked{[/if]} id="rdoMemberStatus" name="rdoMemberStatus" value="2"/>&nbsp;{[$member_00001_NoTrust]}</label>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                            {[$member_00001_Scale]}
                            </td>
                            <td>
                                <label><input type="checkbox" id="chkMemberScaleAll" name="chkMemberScaleAll" onclick="checkAll(this, 'chkMemberScale')" value=""/>&nbsp;{[$member_00001_NoLimit]}</label>&nbsp;
                                <label><input type="checkbox"
                        {[foreach from=$arrSession.MemberScale key=key item=item]}
                        {[if $item == "1"]}checked{[/if]}
                        {[/foreach]}
id="chkMemberScale" name="chkMemberScale" onclick="checkBack(this, 'chkMemberScaleAll')" value="1"/>&nbsp;100{[$member_00001_People]}{[$member_00001_Less]}</label>&nbsp;
                                <label><input type="checkbox"
                        {[foreach from=$arrSession.MemberScale key=key item=item]}
                        {[if $item == "2"]}checked{[/if]}
                        {[/foreach]}
id="chkMemberScale" name="chkMemberScale" onclick="checkBack(this, 'chkMemberScaleAll')" value="2"/>&nbsp;100{[$member_00001_People]}～500{[$member_00001_People]}</label>&nbsp;
                                <label><input type="checkbox"
                        {[foreach from=$arrSession.MemberScale key=key item=item]}
                        {[if $item == "3"]}checked{[/if]}
                        {[/foreach]}
id="chkMemberScale" name="chkMemberScale" onclick="checkBack(this, 'chkMemberScaleAll')" value="3"/>&nbsp;500{[$member_00001_People]}{[$member_00001_More]}</label>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_MemberCreateDate]}
                            </td>
                            <td>
                                <input type="text" id="txtCreateDateFrom" name="txtCreateDateFrom" size="11" maxlength="10" value="{[$arrSession.CreateDateFrom]}"/>
                                <img id="showCreateDateFrom" 
                                onclick="getCalendar('txtCreateDateFrom', 'showCreateDateFrom')" src="{[$host]}theme/commonTheme/img/calendar.gif" />
                                &nbsp;～
                                <input type="text" id="txtCreateDateTo" id="txtCreateDateTo" size="11" maxlength="10" value="{[$arrSession.CreateDateTo]}"/>
                                <img  id="showCreateDateTo" 
                                onclick="getCalendar('txtCreateDateTo', 'showCreateDateTo')" src="{[$host]}theme/commonTheme/img/calendar.gif" />&nbsp;&nbsp;{[$member_00001_Example]}）2010/04/10
                            </td>
                        </tr>
                    </tbody>
                </table>
                </div>
                <div id="searchDetail" style="display:none; " >
                <table class="BGrayLineTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:0px">
                    <tbody>
                        <tr>
                            <td class="BListLabel" width="25%">
                                {[$member_00001_ContractNo]}
                            </td>
                            <td>
                                <input type="text" id="txtContractNo" name="txtContractNo" size="40" value="{[$arrSession.ContractNo]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_Tel]}
                            </td>
                            <td>
                                <input type="text" id="txtTel" name="txtTel" style="width: 77px" value="{[$arrSession.Tel]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_Mobile]}
                            </td>
                            <td>
                                <input type="text" id="txtMobile" name="txtMobile" style="width: 77px" value="{[$arrSession.Mobile]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_Fax]}
                            </td>
                            <td>
                                <input type="text" id="txtFax" name="txtFax" style="width: 77px" value="{[$arrSession.Fax]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_Email]}
                            </td>
                            <td>
                                <input type="text" id="txtEmail" name="txtEmail" size="40" value="{[$arrSession.Email]}"/>&nbsp;<span>{[$member_00001_PartSame]}</span>&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td class="BListLabel">
                                {[$member_00001_OrderCount]}
                            </td>
                            <td>
                                <input type="text" id="txtOrderCountFrom" name="txtOrderCountFrom" size="5" style="text-align: right" value="{[$arrSession.OrderCountFrom]}"/>
                                {[$member_00001_Times]}&nbsp;～
                                <input type="text" id="txtOrderCountTo" name="txtOrderCountTo" size="5" style="text-align: right" value="{[$arrSession.OrderCountTo]}"/>
                                {[$member_00001_Times]}
                            </td>
                        </tr>
                    </tbody>
                </table>
                </div>
                <div class="BSpace20px"></div>
                <div align="center">
                    <input type="button" class="BGrayBtn" value="{[$member_00001_Search]}" onClick="member_memberSearchClick()" />&nbsp;
                    <input type="button" class="BGrayBtn" value="{[$member_00001_SearchConditionClear]}" onClick="member_memberSearchClearClick()"/>
                </div>
                <div class="BSpace20px"></div>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BPasingArea">
                    <tr>
                        <td width="65%" style="vertical-align:bottom;">
                            <span style="color: #000;">{[$member_00001_Notice1]}<br/>
                            {[$member_00001_Notice2]}</span>
                        </td>
                        <td align="right">
                            <span id="orderHead">
                                {[include file="../../../../library/view/templates/tag/order.tpl"]}
                            </span>
                            <span id="pageHead">
                                {[include file="../../../../library/view/templates/tag/pager.tpl"]}
                            </span>
                        </td>
                    </tr>
                </table>
                <table class="BListTable" border="0" cellspacing="0" cellpadding="0" width="100%" id="dataTable">
                    <tbody>
                        <tr class="BTextAlignCenter" id="trHeader_orderHead">
                            <td class="BListTableHeader" style="width: 37px">
                                No.
                            </td>
                            <td class="BListLabel" style="width: 95px" id="A.MEMBER_ID" onclick="initOrder('orderHead');">
                                {[$member_00001_Member]}ID
                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                            </td>
                            <td class="BListLabel" style="width: 94px" id="A.MEMBER_NAME" onclick="initOrder('orderHead');">
                                {[$member_00001_MemberName]}
                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                            </td>
                            <td class="BListLabel" style="width: 85px" id="A.PROV_CODE" onclick="initOrder('orderHead');">
                                {[$member_00001_Prov]}
                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                            </td>
                            <td class="BListLabel" style="width: 300px" id="A.STATUS" onclick="initOrder('orderHead');">
                                {[$member_00001_Status]}
                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                            </td>
                            <td class="BListLabel" style="width: 120px" id="A.LAST_ORDER_DATE" onclick="initOrder('orderHead');">
                                {[$member_00001_LastOrderDate]}
                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                            </td>
                            <td class="BListLabel" style="width: 113px" id="A.ORDER_COUNT" onclick="initOrder('orderHead');">
                                {[$member_00001_OrderCount]}
                                {[include file="../../../../library/view/templates/tag/orderView.tpl"]}
                            </td>
                            <td class="BListTableHeader" style="width: 85px">
                                {[$member_00001_Edit]}
                            </td>
                        </tr>
                        {[foreach from=$arrSearchData key=key item=item]}
                        <tr {[if $key%2 == 1]}class="BListTableGray"{[/if]}>
                            <td align="right">
                                {[$fromRecord+$key]}
                            </td>
                            <td>
                                <a href="{[$host]}member/memberView/index/MemberNo/{[$item.MEMBER_NO]}">{[$item.MEMBER_ID]}</a>
                            </td>
                            <td>
                                <a target="_blank" href="{[$item.HOMEPAGE_URL]}">{[$item.MEMBER_NAME]}</a>
                            </td>
                            <td align="center">
                                {[$item.PROV_CODE]}
                            </td>
                            <td align="center">
                                {[if $item.STATUS == "1"]}
                                    {[$member_00001_Trust]}
                                {[elseif $item.STATUS == "2"]}
                                    {[$member_00001_NoTrust]}
                                {[/if]}
                            </td>
                            <td align="right">
                                {[$item.LAST_ORDER_DATE]}
                            </td>
                            <td align="right">
                                {[$item.ORDER_COUNT]}
                            </td>
                            <td align="center">
                               <input type="button" class="BGrayBtn" value="{[$member_00001_Edit]}" onclick="member_Edit('{[$item.MEMBER_NO]}')"/>
                            </td>
                        </tr>
                        {[/foreach]}
                    </tbody>
                </table>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BPasingArea">
                    <tr>
                        <td align="right">
                            <span id="pageFoot">
                                {[assign var="pageSizeShow" value=false]}
                                {[include file="../../../../library/view/templates/tag/pager.tpl"]}
                            </span>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <div class="BFenceBottomLeft">
                </div>
                <div class="BFenceBottomRight">
                </div>
            </td>
        </tr>
</table>
</div>
<div class="BSpace20px"></div>
<h2>{[$member_00001_DataDownload]}</h2>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <div class="BFenceTopLeft">
            </div>
            <div class="BFenceTopRight">
            </div>
        </td>
    </tr>
    <tr>
        <td class="BFenceSideLine">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td height="40">
                            <select style="width: 200px; margin-left: 20px" id="Select2">
                                <option selected>客户数据全项目</option>
                            </select>&nbsp;
                            <input style="argin-left: 15px" class="BGrayBtn" value="{[$member_00001_Download]}" type="button"/>
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <div class="BFenceBottomLeft">
            </div>
            <div class="BFenceBottomRight">
            </div>
        </td>
    </tr>
</table>
<div class="BSpace20px"></div>
{[include file="../../../../library/view/templates/footer.tpl"]}